﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BankSite
{
    public partial class _Default : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }

        protected void ClientGridView_SelectedIndexChanged(object sender, EventArgs e)
        {
            long SelectedClientId = 0;

            if (this.ClientGridView.SelectedIndex != -1 && Int64.TryParse(this.ClientGridView.Rows[this.ClientGridView.SelectedIndex].Cells[1].Text, out SelectedClientId))
            {
                Session["ClientID"] = SelectedClientId;
            } 
            Response.Redirect(Request.RawUrl); 
        }

        /*public IQueryable<Klienci> studentsGrid_GetData()
        {
            
            Models.BankBaseEntities db = new BankBaseEntities();
            var query = db.Klienci;
            return query;
        }*/
    }
}